<?php /*a:7:{s:61:"E:\code\jiaoyou\application\admin\view\member\apply_list.html";i:1600238197;s:57:"E:\code\jiaoyou\application\admin\view\public\header.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\css.html";i:1598939754;s:53:"E:\code\jiaoyou\application\admin\view\public\js.html";i:1598939754;s:58:"E:\code\jiaoyou\application\admin\view\public\tophead.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\top.html";i:1598939753;s:57:"E:\code\jiaoyou\application\admin\view\public\footer.html";i:1598939753;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>后台系统</title>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/animate.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/style.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/ffxiang.css" />
<link rel="shortcut icon" href="http://jiaoyou.com\/style/admin/img/favicon.ico">
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/layui/css/layui.css" />
</head>
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }

    #title span {
        float: right;
    }

    .btn-active {
        background: #1ab394;
        color: #fff
    }

    /*#nav a{*/
        /*border:2px #bbb solid!important;color:#101010!important;*/
        /*backgroud:#fff;*/
    /*}*/

</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <?php 
$controller=strtolower(request()->controller());
$action=strtolower(request()->action());
$adminCtegory=db('category')->where(['controller'=>$controller,'function'=>$action])->cache(_cache('db'))->find();
$admin = Session::get('admin', 'mmjtAdmin');

if ($admin['id'] != 1 && $admin['type'] != 1) {
  $auth_visit = Db::name('admin_type')->where(['id' => $admin['type']])->value('data');
  $auth_visit = json_decode($auth_visit, true);
}else{
  $auth_visit = Db::name('category')->column('id');
}
if($adminCtegory){
	$adminCtegoryTid=db('category')->where(['tid'=>$adminCtegory['id'],'hideright'=>1])->order('des asc,id asc')->cache(_cache('db'))->select();
}else{
  $adminCtegoryTid=[];
}
 ?>
<div class="">
	<?php if(is_array($adminCtegoryTid) || $adminCtegoryTid instanceof \think\Collection || $adminCtegoryTid instanceof \think\Paginator): $i = 0; $__LIST__ = $adminCtegoryTid;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;
  $get=$v['get'];
  $geturl=[]; 
  if($get){
    if(strstr($get,"|")){
      $tidexplode=explode("|",$get);
      foreach($tidexplode as $va){
        $geturl[$va]=input($va);
      }
    }else{
        $geturl[$get]=input($get);
    }
  }
  $geturl['url']='-1';
  $url=url($v['controller'].'/'.$v['function'],$geturl);
   if(in_array($v['id'],$auth_visit)): ?><a onclick="add('<?php echo htmlentities($url); ?>')" href="javascript:void(0);" class="btn btn-primary "><?php echo htmlentities($v['title']); ?></a><?php endif; ?>
  <?php endforeach; endif; else: echo "" ;endif; ?>
</div>
<script type="text/javascript">
function add(url){
        layer.open({
          type: 2,
          title: '提示',
          shadeClose: false,
          shade: 0.2,
          area: ['90%', '90%'],
          skin:'shangchuantup',
          shift:-1,
          content: url,
          scrollbar: false,
          moveType: 1,
          moveOut: true
        }); 
}
</script>
        <div class="ibox-title">
<h5>
<?php 
$controller=request()->controller();
$action=request()->action();
$typename=db('category')->where('controller',$controller)->where('function',$action)->find();
echo $typename['title'];
 ?></h5>
</div>
        <div class="ibox-content">
            <div class="row row-lg">

                <div style="display:block;clear: both;"></div>
                <div class="fixed-table-toolbar" id="nav">
                    <a class="btn btn-default btn-outline<?php if(input('get.type/d') == ''): ?> btn-active<?php endif; ?>"
                       href="<?php echo url('Member/applyList'); ?>">所有申请</a>
                    <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 1): ?> btn-active<?php endif; ?>"
                       href="<?php echo url('Member/applyList',['type'=>1]); ?>">今日申请</a>
                    <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 2): ?> btn-active<?php endif; ?>"
                       href="<?php echo url('Member/applyList',['type'=>2]); ?>">初审申请</a>
                    <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 3): ?> btn-active<?php endif; ?>"
                       href="<?php echo url('Member/applyList',['type'=>3]); ?>">复审申请</a>
                    <?php if($handle_count>0): ?><a style="float: right;" class="btn btn-default" onClick="delAll(-1)">清除已处理<?php echo htmlentities($handle_count); ?></a><?php endif; ?>
                </div>

                <div class="example">
                    <form class="form-horizontal" method="post">
                        <table data-toggle="table">
                            <thead>
                            <tr>
                                <th data-align="center">ID</th>
                                <th data-align="center">用户ID</th>
                                <th data-align="center">头像</th>
                                <th data-align="center">昵称</th>
                                <th data-align="center">出生日期</th>
                                <th data-align="center">性别</th>
                                <th data-align="center">城市</th>
                                <th data-align="center">手机</th>
                                <th data-align="center">微信</th>
                                <th data-align="center">职业</th>
                                <th data-align="center">其他</th>
                                <th data-align="center">拒绝理由</th>
                                <th data-align="center">提交时间</th>
                                <th data-align="center">申请类型</th>
                                <th data-align="center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                            <tr id="id<?php echo htmlentities($vo['id']); ?>">
                                <td><?php echo htmlentities($vo['id']); ?></td>
                                <td><?php echo htmlentities($vo['member_id']); ?></td>
                                <td><img src="<?php if(empty($vo['avatar'])): ?>http://jiaoyou.com\/disk/avatar/user-default.jpg<?php else: ?><?php echo htmlentities($vo['avatar']); ?><?php endif; ?>" width="40" height="40"/></td>
                                <td><?php echo htmlentities($vo['nickname']); ?></td>
                                <td><?php echo htmlentities($vo['birthday']); ?></td>
                                <td><?php echo htmlentities($sexs[$vo['sex']]); ?></td>
                                <td><?php echo htmlentities($vo['city_name']); ?></td>
                                <td><?php echo htmlentities($vo['username']); ?></td>
                                <td><?php echo htmlentities($vo['wechat']); ?></td>
                                <td><?php echo htmlentities($vo['profession']); ?></td>
                                <td><span class="btn btn-xs btn-primary" onClick="showOther(this)"
                                          data-content_types="<?php echo htmlentities($vo['content_types']); ?>"
                                          data-expect_object="<?php echo htmlentities($vo['expect_object']); ?>"
                                          data-height="<?php echo htmlentities($vo['height']); ?>"
                                          data-weight="<?php echo htmlentities($vo['weight']); ?>"
                                >查看</span></td>
                                <td><?php echo htmlentities($vo['reason']); ?></td>
                                <td><?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($vo['apply_time'])? strtotime($vo['apply_time']) : $vo['apply_time'])); ?></td>
                                <td><?php if($vo['first_trial']): ?>初审<?php else: ?>复审<?php endif; ?></td>
                                <td>
                                    <span class="btn btn-xs btn-primary" <?php if($vo['state']<>3): ?>onClick="add('<?php echo url('Member/applyAdd',['id'=>$vo['id'],'url'=>-1]); ?>')"
                                    <?php endif; ?>><?php echo htmlentities($states[$vo['state']]); ?></span> </td>
                                </td>
                            </tr>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>

            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages"><?php echo $page; ?></div>
            </div>
        </div>
    </div>
</div>
     
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.css" />
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/ffxiangIndex.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/common.js"></script>
</body>
</html>
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table.min.css" />
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript">
    function showOther(object) {
        var content_types = object.dataset.content_types;
        var expect_object = object.dataset.expect_object;
        var weight = object.dataset.weight;
        var height = object.dataset.height;
        var content_types_arr = content_types.split('/');
        var expect_object_arr = expect_object.split('/');

        var content = '<div style="padding:20px 50px 20px; line-height: 22px;"> 交友节目：&nbsp;&nbsp;&nbsp;&nbsp;';
        for (var i = 0; i < content_types_arr.length; i++) {
            content = content + content_types_arr[i] + "&nbsp;&nbsp;"
        }
        content = content + '<br> 期望对象：&nbsp;&nbsp;&nbsp;&nbsp;';
        for (var i = 0; i < expect_object_arr.length; i++) {
            content = content + expect_object_arr[i] + "&nbsp;&nbsp;"
        }
        content = content + '<br>身高：&nbsp;&nbsp;&nbsp;&nbsp;';
        content = content + height;
        content = content + '<br>体重：&nbsp;&nbsp;&nbsp;&nbsp;';
        content = content + weight;
        layer.open({
            type: 1,
            title: '其他',
            shadeClose: false,
            shade: 0.2,
            area: ['80%', '30%'],
            // skin: 'shangchuantup',
            content: content
        });
    }

    //id  -1删除所有
    function delAll() {

        swal_delAll({'state': '1,2,3'}, "<?php echo url('Member/delAllApply'); ?>", "1")
    }

</script>
